import config from "@/config"
import http from "@/utils/request"

export default {
	list: {
		url: `${config.API_URL2}/api/menus`,
		name: "角色列表",
		get: async function(data={}){
			return await http.get(this.url, data);
		}
	},
	loginList: {
		url: `${config.API_URL2}/api/menus/loginMenu`,
		name: "角色列表",
		post: async function(data={}){
			return await http.post(this.url, data);
		}
	},
	delete: {
		url: `${config.API_URL2}/api/menus`,
		name: "删除角色",
		delete: async function(ids){
			let deleteUrl = `${this.url}/${ids}`;
			return await http.delete(deleteUrl);
		}
	},
	post: {
		url: `${config.API_URL2}/api/menus`,
		name: "增加角色",
		post: async function(data){
			return await http.post(this.url, data);
		}
	}
}
